/*
 * mhmedia.h
 *
 *  Created on: 2010-7-14
 *      Author: angelstone
 */

#pragma once

#include "hiberlite.h"
#include "mhmacros.h"
#include "mhtagcontainer.h"
#include "mhcommentcontainer.h"
#include "mhpropertycontainer.h"
#include "data/wxhiberlite.h"

namespace mediahouse {
	class CMHMedia: public CMHTagContainer,
			public CMHCommentContainer,
			public CMHPropertyContainer {

		friend class hiberlite::access;

		template<class Archive>
		void hibernate(Archive & ar) {
			ar & HIBERLITE_NVP(m_Location);
			ar & HIBERLITE_NVP(m_Created);
			ar & HIBERLITE_NVP(m_Modified);

			ar & HIBERLITE_BASE_CLASS(CMHTagContainer);
			ar & HIBERLITE_BASE_CLASS(CMHCommentContainer);
			ar & HIBERLITE_BASE_CLASS(CMHPropertyContainer);
		}

	public:
	IMPL_PROPERTY(wxString, Location)
		;
	IMPL_PROPERTY(wxDateTime, Created)
		;
	IMPL_PROPERTY(wxDateTime, Modified)
		;
	};
}

namespace hiberlite {
	template<>
	std::string Database::getClassName<mediahouse::CMHMedia>();
}

